package class3_10;

import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;

public class ScriptTest {

	public static void main(String[] args) {
		ScriptEngineManager manager = new ScriptEngineManager();
		ScriptEngine engine = manager.getEngineByName("js");
		try {
			Object result = engine.eval("4*5");
			System.out.println(result.getClass()+"   "+result);
		} catch (ScriptException e) {
			e.printStackTrace();
		}
	}

}
